<include file="public/header" title="账户明细" body=""/>
<include file="public/header_nav" title="账户明细"  href="{:U('User/account')}"/>

<style>
	.head_acc ul .red a{
		color: white!important;
	}
</style>

<div class="allaccounted">
    <div class="maleri30">
        <div class="head_acc ma-to-20">
            <ul>
                <li <if condition="$type eq 'all'">class="red"</if>">
                    <a href="{:U('User/account_list',array('type'=>'all'))}"  data-list="1">全部</a>
                </li>
                <li <if condition="$type eq 'plus'">class="red"</if>>
                    <a href="{:U('User/account_list',array('type'=>'plus'))}"   data-list="2">赚取</a>
                </li>
                <li  <if condition="$type eq 'minus'">class="red"</if>>
                    <a href="{:U('User/account_list',array('type'=>'minus'))}"  data-list="3">消费</a>
                </li>
            </ul>
        </div>

         <div class="allpion">
          	<div class="fll_acc">
         	<ul><li>描述</li><li>余额增减</li><li>时间</li></ul>
         </div>
         
         <!--没有账户明细-->
         <empty name="account_log">
           <div class="none" >
  	        <img src="__STATIC__/images/none2.png">
  	        <br><br>
  	        <i class="account-acco1"></i>您还没有此记录！
  	        <div class="paiton">
  	            
  	        </div>
  	    </div>
        </empty>
	      <!--没有账户明细end-->
         
         
              <foreach name="account_log" item="v">
                  <div style='position: relative;' class="fll_acc" onclick="ajax_account_detail(this)" data-url="{:U('Mobile/User/account_detail',['log_id'=>$v['log_id']])}" >
                      <ul >
                          <li>{$v[desc]}</li>
                          <li>
                              <span class="red">{$v[user_money]}</span>
                          </li>
                          <li style="position: absolute;left: 450px;top: -10px;">
                              <p class="coligh">
                                  <span>{:date('Y-m-d H:i:s',$v[change_time])}</span>
                              </p>
                          </li>
                      </ul>
                  </div>
              </foreach>
        </div>

        <div id="getmore"  style="font-size:.32rem;text-align: center;color:#888;padding:.25rem .24rem .4rem; clear:both;display: none">
            <a >已显示完所有记录</a>
        </div>
    </div>
</div>

<script type="text/javascript" src="__STATIC__/js/sourch_submit.js"></script>
<script type="text/javascript">
//    var record=$('.record').val();   //获取记录类型
    //加载更多记录
    var page = 1;
    function ajax_sourch_submit()
    {
        page ++;
        $.ajax({
            type : "GET",
            url:"/index.php?m=Mobile&c=User&a=account_list&is_ajax=1&type={$type}&p="+page,//+tab,
            success: function(data)
            {
                if($.trim(data) == '') {
                    $('#getmore').show();
                    return false;
                }else{
                    $(".allpion").append(data);}
            }
        });
    }
    function ajax_account_detail(obj){
            window.location.href=$(obj).data('url');
    }
</script>
</body>
</html>